include $(TOPDIR)/rules.mk

PKG_NAME:=ai_assistant
PKG_VERSION:=1.0
PKG_RELEASE:=1

PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)

include $(INCLUDE_DIR)/package.mk

define Package/ai_assistant
  SECTION:=utils
  CATEGORY:=aios
  TITLE:=ai_assistant
  DEPENDS:=
endef

define Package/ai_assistant/description
  ai assistant
endef

define Build/Prepare
	mkdir -p $(PKG_BUILD_DIR)
endef

define Build/Compile
	$(CP) ./dist/* $(PKG_BUILD_DIR)/
endef

define Package/ai_assistant/install
	$(INSTALL_DIR) $(1)/usr/bin
	$(INSTALL_BIN) $(PKG_BUILD_DIR)/ai_assistant $(1)/usr/bin/
	$(INSTALL_DIR) $(1)/etc/init.d
	$(INSTALL_BIN) ./files/etc/init.d/ai_assistant $(1)/etc/init.d/
endef

$(eval $(call BuildPackage,ai_assistant))